<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>条件语句</title>
  <script type="text/javascript">
  /* 
  条件语句：
  1.if语句：省略
  2.switch...case语句
  */
 /* 
 练习：输出成绩大于60分合格，低于60分不合格
 */
var score=parseInt(64/10);
switch(score){
  case 10:
  case 9:
  case 8:
  case 7:
  case 6:
  document.write("合格");
   break;
  case 5:
  case 4:
  case 3:
  case 2:
  default:
    document.write("不合格");
    break;
}
//console.log(score);
var score1=54;
switch(true){
//case parseInt(score1/10)>=6:
case score1>=60:
  document.write("合格");
  break;
default:
  document.write("不合格");
  break;
}
  </script>

</head>
<body>
  
</body>
</html>